Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change static files serving to whitenoise plugin #1491

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

korgan00
Copy link
Collaborator

@korgan00 korgan00 commented Sep 17, 2024

Summary

Right now we have some limitations in the way we are serving static files because Django doesn't serve them by default. I use a plugin to implement better static files sharing.

Details and comments

Using whitenoise for django plugin to manage static files.

@korgan00 korgan00 marked this pull request as draft September 17, 2024 17:03
@korgan00 korgan00 marked this pull request as ready for review September 17, 2024 17:21
@psschwei
Copy link
Collaborator

Will this help with the issues in #1236 ?

@korgan00
Copy link
Collaborator Author

I cannot be sure, but my intuition say that it should. Right now it works with docker.

@psschwei
Copy link
Collaborator

Could we also check against Kubernetes? We should also test there since that's where we ultimately deploy. Docker can be useful for running code locally, but otherwise it can also get you into a bit of trouble down the line too...

You can use Kind to run a cluster locally.

@psschwei
Copy link
Collaborator

ok, just checked and the docs DO show up on kubernetes 🎉

image

psschwei
psschwei previously approved these changes Sep 19, 2024
@psschwei
Copy link
Collaborator

@korgan00 if you want to grab some time next week, I can walk you through setting up a local kubernetes environment for testing

@Tansito
Copy link
Member

Tansito commented Sep 19, 2024

@psschwei could you double check too that the panel administrator loads correctly? 🙏

@psschwei
Copy link
Collaborator

@Tansito that would be /backoffice right? (so locally, http://localhost:8000/backoffice)

@Tansito
Copy link
Member

Tansito commented Sep 19, 2024

Yes!

@korgan00
Copy link
Collaborator Author

Thank you! I was reading about kind and started installing but I was resolving some security issues and wasn't able to finish the kubernetes test.

@psschwei
Copy link
Collaborator

admin panel works

image

@Tansito
Copy link
Member

Tansito commented Sep 20, 2024

It worked with DEBUG=0, @psschwei ? Sorry for the double check, I remember having problems with that debug configuration.

@psschwei
Copy link
Collaborator

No -- for my local setup I default to DEBUG=1, so still need to check with DEBUG=0...

@psschwei psschwei dismissed their stale review September 20, 2024 14:45

need to check debug config

Copy link
Collaborator

@psschwei psschwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that admin panel works with DEBUG=0

image

Copy link
Member

@Tansito Tansito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you @psschwei for the double check, really appreciate it. And congrats @korgan00 for your first PR 🎉

@korgan00 korgan00 merged commit fd873f7 into main Sep 24, 2024
10 checks passed
@korgan00 korgan00 deleted the static-files-whitenoise branch September 24, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants